#pragma once
#include <Arduino.h>
#include "../config.h"

// MODE
#define MODE_TOUCH 0
#define MODE_SERIAL 1

// maimai Serial
enum
{
    commandRSET = 0x45,  // E
    commandHALT = 0x4C,  // L
    commandSTAT = 0x41,  // A
    commandRatio = 0x72, // r
    commandSens = 0x6B,  // k
};

typedef unsigned long millis_t; // millis

//核心注册
class Core{
    public:
        static void init();
        static void core_main();
        static int32_t mode;
        static uint8_t status;
        static uint8_t serial_ok;
        static millis_t touch_delaytime;
    
    private:
        static void vtask_init();

};
extern Core core;